/**
 * Copyright (c) Enalean, 2017 - 2018. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

@import 'widgets/contacts';
@import 'widgets/heartbeat';
@import 'widgets/imageviewer';
@import 'widgets/lastcommit';
@import 'widgets/myprojects';
@import 'widgets/project-members';
@import 'widgets/trackerv3';
@import 'widgets/project-classification';
@import 'widgets/welcomemessage';

.dashboard-widget-container {
    width: 100%;
}

// scss-lint:disable QualifyingElement
.dashboard-widget-asynchronous-loading,
.tlp-table > tbody > tr:nth-child(odd) > td.dashboard-add-widget-content-loading,
.edit-widget-modal-content-loading {
    height: 200px;
    background: $tlp-ui-white url('../images/spinner.gif') center center no-repeat;
}

.dashboard-widget-header {
    display: flex;
    justify-content: space-between;

    &.dashboard-widget-movable {
        cursor: move;
    }
}

.dashboard-widget-icons {
    display: flex;
    margin: 3px 0 0;
    cursor: default;
}

.dashboard-widget-icons-minimize {
    margin: 0 5px 0 0;
}

.dashboard-widget-icons-minimize,
.dashboard-widget-actions {
    transition: color 100ms, opacity 100ms;
    opacity: .2;
    color: $tlp-ui-dimmed;
    cursor: pointer;

    &:hover {
        opacity: 1;
        color: $tlp-theme-color;
    }
}

.dashboard-widget-content {
    margin: $tlp-spacing;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.dashboard-add-widget-body {
    padding: 0;
}

.dashboard-add-widget-content {
    display: flex;
}

.dashboard-add-widget-list {
    flex: 1;
    padding: $tlp-spacing;
}

.dashboard-add-widget-list-body {
    max-height: 50vh;
    overflow-x: hidden;
    overflow-y: scroll;
}

#dashboard-add-widget-settings {
    flex: 1;
    padding: $tlp-spacing;
    border-left: 1px solid $tlp-ui-border-light;
}

.dashboard-add-widget-settings-content {
    display: flex;
    flex-direction: column;
}

.dashboard-add-widget-settings-image {
    align-self: center;
}

.dashboard-add-widget-list-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.dashboard-add-widget-list-table-widget {
    cursor: pointer;
}

// scss-lint:disable QualifyingElement
.tlp-table > tbody > tr.dashboard-add-widget-list-table-widget-selected {
    > .dashboard-add-widget-list-table-widget-content-name,
    > .dashboard-add-widget-list-table-widget-content-link,
    > .dashboard-add-widget-list-table-widget-content-used {
        background: transparentize($tlp-theme-color, .93);
    }

    > .dashboard-add-widget-list-table-widget-content-link > .dashboard-add-widget-list-table-widget-content-link-icon {
        transform: scale(1.2);
        color: $tlp-theme-color;
    }
}

.dashboard-add-widget-list-table-widget-content-name {
    width: 100%;
}

.dashboard-add-widget-list-table-widget-content-link,
.dashboard-add-widget-list-table-widget-content-used {
    transition: transform 50ms linear;
    color: $tlp-ui-dimmed;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}

#dashboard-add-widget-settings-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    text-align: center;

    > .empty-page-icon {
        color: transparentize($tlp-theme-color, .7);
        font-size: 70px;
    }
}
